package com.crm.common.model.Enum;

/**
 * 修改名称
 */
public enum CustomerEnum {

    CUSTOMERNAME("customerName","客户名称"),
    CUSTOMERNUMBER("customerNumber","客户编号"),
    CUSTOMERTYPE("customerType","客户类型"),
    CUSTOMERLEVEL("customerLevel","客户级别"),
    UNIFIEDSOCIALCREDITCODE("unifiedSocialCreditCode","统一社会信用代码"),
    ORIGINALCUSTOMERID("originalCustomerId","原客户ID"),
    CUSTOMERINDUSTRYFIRST("customerIndustryFirst","客户行业-一级"),
    CUSTOMERINDUSTRYSECOND("customerIndustrySecond","客户行业-二级"),
    PROVINCECODE("provinceCode","省份编码"),
    PROVINCENAME("provinceName","省份名称"),
    CITYCODE("cityCode","城市编码"),
    CITYNAME("cityName","城市名称"),
    COUNTYCODE("countyCode","区/县编码"),
    COUNTYNAME("countyName","区/县名称"),
    DETAILEDADDRESS("detailedAddress","详细地址"),
    ENTERPRISEEXTERNALPHONE("enterpriseExternalPhone","企业对外手机"),
    ENTERPRISEEXTERNALLANDLINE("enterpriseExternalLandline","企业对外座机"),
    COMPANYWEBSITE("companyWebsite","公司网址"),
    COMPANYSIZE("companySize","公司规模"),
    REGISTRATIONNUMBER("registrationNumber","注册号"),
    ORGANIZATIONCODE("organizationCode","组织机构代码"),
    COMPANYTYPE("companyType","公司类型"),
    LEGALREPRESENTATIVE("legalRepresentative","法定代表人"),
    REGISTEREDCAPITAL("registeredCapital","注册资本"),
    REGISTRATIONTIME("registrationTime","注册时间"),
    BUSINESSSCOPE("businessScope","经营范围"),
    ENTERPRISESTATE("enterpriseState","企业状态"),
    CAPITALTYPE("capitalType","资本类型"),
    INSUREDNUMBER("insuredNumber","参保人数"),
    FAX("fax","传真"),
    EMAIL("email","邮箱"),
    REMARK("remark","备注"),
    OWNERID("ownerId","所有人id"),
    UPLOADID("uploadId","图片上传id"),
    CUSTOMERSOURCE("customerSource","客户来源"),
    CUSTOMERSTATE("customerState","客户状态"),
    INDUSTRYX("industry","行业"),
    TAG("tag","标签"),
    DEALSTATUS("dealStatus","成交状态"),
    COMPANYNAME("companyName","所属公司"),
    CURRENTSTATUS("currentStatus","目前状态"),
    CUSTOMERRATING("customerRating","客户评分"),
    CONTACTPERSON("contactPerson","联系人"),
    CONTACTPERSONPHONE("contactPersonPhone","联系人电话"),
    FINANCIALNUMBER("financialNumber","财务人数");


    private String ModificationCode;
    private String ModificationName;

    CustomerEnum(String ModificationCode, String ModificationName){
        this.ModificationCode = ModificationCode;
        this.ModificationName = ModificationName;
    }

    public String getModificationCode(){
        return ModificationCode;
    }

    public String getModificationName(){
        return ModificationName;
    }

    /**
     * 获取修改名称
     * @param modificationCode
     * @return
     */
    public static String getNameByCode(String modificationCode){
        for (CustomerEnum value : CustomerEnum.values()) {
            if( modificationCode.equals(value.getModificationCode())){
                return value.getModificationName();
            }
        }
        return null;
    }

}
